package com.powernode.feign;

import com.powernode.domain.Order;
import com.powernode.feign.hystrix.UserOrderFeignHystrix;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * 本类用来演示:定义公用的方法
 *
 * @Author 胡英俊
 * @Date 2022/7/17 23:44
 */
@FeignClient(value = "order-center",fallback = UserOrderFeignHystrix.class)
public interface UserOrderFeign {
    @GetMapping("/order/getOrderById/{id}")
    public Order getOrderById(@PathVariable("id") Integer id);
}
